﻿namespace EFS.RC.CC.CH.Config
{
	public static class Settings
	{
		#region Composition
		private static System.Boolean loaded = false;
		#endregion

		#region LoadConfiguration
		private static void Load()
		{
			// read section
			EFS.Common.Config.Reader conf = new EFS.Common.Config.Reader("EFS/CC/CH", false);

			// check
			EFS.Common.Verify.Reference(conf, "conf EFS/CC/CH");

			// connection string
			qrdConnectionString = conf.GetAttributeString("qrdConnectionString");
			socratesConnectionString = conf.GetAttributeString("socratesConnectionString");

			// loaded
			loaded = true;
		}
		#endregion

		#region Properties
		/// Property LyncQrdConnectionString: Get
		private static System.String qrdConnectionString = null;
		public static System.String QrdConnectionString
		{
			get
			{
				if (!loaded)
				{
					Load();
				}
				return qrdConnectionString;
			}
			set // this MUST be read / write
			{
				qrdConnectionString = value;
			}
		}

		/// Property LyncSocratesConnectionString: Get
		private static System.String socratesConnectionString = null;
		public static System.String SocratesConnectionString
		{
			get
			{
				if (!loaded)
				{
					Load();
				}
				return socratesConnectionString;
			}
			set // this MUST be read / write
			{
				socratesConnectionString = value;
			}
		}

		#endregion
	}

}